package com.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.pojo.parent.BaseEntity;
import com.utility.constant.MessageConstant;
import com.utility.gruops.InsertAndUpdateGroups;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 系统角色表
 * </p>
 *
 * @author hewei
 * @since 2020-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("system_role")
public class SystemRoleEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    @NotNull(groups = InsertAndUpdateGroups.class,
            message = "角色名称"+ MessageConstant.NULL_MESSAGE)
    @Length(groups = InsertAndUpdateGroups.class,
            min = 1,
            max = 128,
            message =  "角色名称"+ MessageConstant.LENGTH_MESSAGE_128)
    private String roleName;


    /**
     * 角色描述
     */
    @Length(groups = InsertAndUpdateGroups.class,min = 1,max = 512,message = "角色描述"+ MessageConstant.LENGTH_MESSAGE_128)
    private String roleDesc;


}
